﻿Imports System
Imports System.Collections.Generic

Namespace System.Workflow.ComponentModel
    Friend Interface IWorkflowCoreRuntime
        Inherits IServiceProvider
        ' Methods
        Sub ActivityStatusChanged(ByVal activity As Activity, ByVal transacted As Boolean, ByVal committed As Boolean)
        Sub CheckpointInstanceState(ByVal currentActivity As Activity)
        Sub DisposeCheckpointState()
        Function GetContextActivityForId(ByVal id As Integer) As Activity
        Function GetNewContextActivityId() As Integer
        Function GetService(ByVal currentActivity As Activity, ByVal serviceType As Type) As Object
        Function LoadContextActivity(ByVal contextInfo As ActivityExecutionContextInfo, ByVal outerContextActivity As Activity) As Activity
        Sub OnAfterDynamicChange(ByVal updateSucceeded As Boolean, ByVal changes As IList([Of] WorkflowChangeAction))
        Function OnBeforeDynamicChange(ByVal changes As IList([Of] WorkflowChangeAction)) As Boolean
        Sub PersistInstanceState(ByVal activity As Activity)
        Sub RaiseActivityExecuting(ByVal activity As Activity)
        Sub RaiseException(ByVal e As Exception, ByVal activity As Activity, ByVal responsibleActivity As String)
        Sub RaiseHandlerInvoked()
        Sub RaiseHandlerInvoking(ByVal delegateHandler As Delegate)
        Sub RegisterContextActivity(ByVal activity As Activity)
        Sub RequestRevertToCheckpointState(ByVal currentActivity As Activity, ByVal callbackHandler As EventHandler([Of] EventArgs), ByVal callbackData As EventArgs, ByVal suspendOnRevert As Boolean, ByVal suspendReason As String)
        Function [Resume]() As Boolean
        Sub SaveContextActivity(ByVal contextActivity As Activity)
        Sub ScheduleItem(ByVal item As SchedulableItem, ByVal isInAtomicTransaction As Boolean, ByVal transacted As Boolean, ByVal queueInTransaction As Boolean)
        Function SetCurrentActivity(ByVal activity As Activity) As IDisposable
        Function StartWorkflow(ByVal workflowType As Type, ByVal namedArgumentValues As Dictionary([Of] String, Object)) As Guid
        Function SuspendInstance(ByVal suspendDescription As String) As Boolean
        Sub TerminateInstance(ByVal e As Exception)
        Sub Track(ByVal key As String, ByVal data As Object)
        Sub UnregisterContextActivity(ByVal activity As Activity)

        ' Properties
        ReadOnly Property CurrentActivity As Activity
            Get
        End Property
        ReadOnly Property CurrentAtomicActivity As Activity
            Get
        End Property
        ReadOnly Property InstanceID As Guid
            Get
        End Property
        ReadOnly Property IsDynamicallyUpdated As Boolean
            Get
        End Property
        ReadOnly Property RootActivity As Activity
            Get
        End Property
    End Interface
End Namespace

